//Naming
Name M26 Pershing
ShortName M26 Pershing
//Visuals
Icon iconpershing
Model CowPack.Pershing
Texture skinpershing
//Third Person Camera Distance
CameraDistance 7.5
//Throttle
MaxThrottle 0.9
MaxNegativeThrottle 0.4
//Steering modifiers
TurnLeftSpeed 0.4
TurnRightSpeed 0.4
//For calculating whether wheels are on the ground or not for driving
WheelRadius 1.0
RotateWheels True 
//Wheel positions for collision handling. Tanks still have 4 wheels, they are just the corner ones.
WheelPosition 0 -32 -12 -18
WheelPosition 1 -32 -12 18
WheelPosition 2 32 -12 18
WheelPosition 3 32 -12 -18
WheelSpringStrength 0.5
//If true, then all wheels will apply drive forces
FourWheelDrive true
//Tank mode activate
Tank true
//Fuel Tank Size (1 point of fuel will keep one propeller going with throttle at 1 for 1 tick)
FuelTankSize 2000
//Inventory Slots
CargoSlots 5
ShellSlots 5
//Driver and passenger positions
Driver 0 42 0 -360 360 -8 15
RotatedDriverOffset -6 0 10 
Passengers 0
//Passenger 1 0 34 0 turret -360 360 -15 60 bren Bren
//GunOrigin 1 0 40 0
BarrelPosition 136 43 0
AllowAllAmmo False 
AddAmmo 90mmaphe
//Secondary gun
AddGun 6 57.5 -2.5 turret 50calg
AddGun 36 45 13 turret 30calg
//Delays are in ticks or 1/20ths of seconds
ShootDelay 2
ShellDelay 210
//Sounds
StartSound cowtankstart
StartSoundLength 20
EngineSound cowtankmove
EngineSoundLength 75
ShootSoundPrimary american90shell
ShootSoundSecondary america50calshoot
//Recipe
//Each section of the plane may have many parts
//The sections are tailWheel, tail, bay, topWing, leftWingWheel, leftWing, rightWingWheel,
//rightWing, nose, turret, coreWheel, core
AddRecipeParts turret 1 cowturret
AddRecipeParts core 1 cowchassis 20 metalcompound
AddRecipeParts leftTrack 2 cowwheel
AddRecipeParts rightTrack 2 cowwheel

//Health and collision
SetupPart core 650 -79 0 -23 133 27 47
SetupPart turret 600 -40 27 -23 70 21 47
SetupPart leftTrack 400 -79 -8 24 135 25 15
SetupPart rightTrack 400 -79 -8 -38 135 25 15

BulletDetection 5

//Size Multiplier; scales up the model
ModelScale 1.0
IsExplosionWhenDestroyed true

DriverAimSpeed 2 2.5 0

TrackLinkLength 4

RightLinkPoint [54,12.5,-32.5]
RightLinkPoint [54,7.5,-32.5]
RightLinkPoint [49,2.5,-32.5]
RightLinkPoint [36,-8.5,-32.5]
RightLinkPoint [-56,-8.5,-32.5]
RightLinkPoint [-73,-2.5,-32.5]
RightLinkPoint [-78,2.5,-32.5]
RightLinkPoint [-78,9.5,-32.5]
RightLinkPoint [-46,17.5,-32.5]
RightLinkPoint [49,17.5,-32.5]


LeftLinkPoint [54,12.5,32.5]
LeftLinkPoint [54,7.5,32.5]
LeftLinkPoint [49,2.5,32.5]
LeftLinkPoint [36,-8.5,32.5]
LeftLinkPoint [-56,-8.5,32.5]
LeftLinkPoint [-73,-2.5,32.5]
LeftLinkPoint [-78,2.5,32.5]
LeftLinkPoint [-78,9.5,32.5]
LeftLinkPoint [-46,17.5,32.5]
LeftLinkPoint [49,17.5,32.5]

//----------------------------Damage
AddEmitter smoke 2 [-34,26,-25.25] [7,1,7] [0,0.5,0] -1 1 0 0.75 core
AddEmitter smoke 2 [-34,26,25.25] [7,1,7] [0,0.5,0] -1 1 0 0.75 core
AddEmitter smoke 2 [5,43,14] [3,1,3] [0,0.5,0] -1 1 0 0.75 turret

AddEmitter largesmoke 3 [-34,26,-25.25] [7,1,7] [0,1,0] -1 1 0 0.5 core
AddEmitter largesmoke 3 [-34,26,25.25] [7,1,7] [0,1,0] -1 1 0 0.5 core
AddEmitter largesmoke 2 [5,43,14] [3,1,3] [0,0.5,0] -1 1 0 0.5 turret

AddEmitter largesmoke 1 [-34,26,-25.25] [7,1,7] [0,1.5,0] -1 1 0 0.25 core
AddEmitter largesmoke 1 [-34,26,25.25] [7,1,7] [0,1.5,0] -1 1 0 0.25 core

AddEmitter flame 1 [-34,26,-25.25] [5,1,5] [0,1,0] -1 1 0 0.25 core
AddEmitter flame 1 [-34,26,25.25] [5,1,5] [0,1,0] -1 1 0 0.25 core
AddEmitter largesmoke 1 [5,43,14] [3,1,3] [0,1,0] -1 1 0 0.5 turret

Description American Medium Tank_90mm APHE

//Barrel
ShootParticlesSecondary crit 0.5 0 0

ShootParticlesPrimary largesmoke 0.5 0 0.1
ShootParticlesPrimary largesmoke 0.5 0 -0.1
ShootParticlesPrimary largesmoke 0.5 0.06 0.06
ShootParticlesPrimary largesmoke 0.5 0.06 -0.06
ShootParticlesPrimary largesmoke 0.5 -0.06 0.06
ShootParticlesPrimary largesmoke 0.5 -0.06 -0.06
ShootParticlesPrimary largesmoke 0.5 -0.1 0
ShootParticlesPrimary largesmoke 0.5 0.1 0
ShootParticlesPrimary cloud 0.05 0 0.2
ShootParticlesPrimary cloud 0.05 0 -0.2
ShootParticlesPrimary cloud 0.05 0.13 0.13
ShootParticlesPrimary cloud 0.05 0.13 -0.13
ShootParticlesPrimary cloud 0.05 -0.13 0.13
ShootParticlesPrimary cloud 0.05 -0.13 -0.13
ShootParticlesPrimary cloud 0.05 -0.2 0
ShootParticlesPrimary cloud 0.05 0.2 0